package cn.sofwin.day0108.homework;

public class RabbitNumber {
    public static void main(String[] args) {
        int rabbit = 1;
        int lastMonth = 1;
        int blastMonth = 1;
        for (int month = 1; month <= 12; month++) {
            if (month >= 3) {
                rabbit = lastMonth + blastMonth;
                blastMonth = lastMonth;
                lastMonth = rabbit;
            }


        }
        System.out.println("一年后兔子的数量为：" + rabbit * 2);
    }
}/*月份  兔子对数
    1       1
    2       1
    3       2
    4       3
    5       5
    6       8
    7       13
    8       21
    9       34
    10      55
    11      89
    12      144
    */
